linenoise: add package
authorMaxim Storchak <[email protected]>
Sat, 4 Oct 2025 21:03:51 +0000 (00:03 +0300)
committerGeorge Sapkin <[email protected]>
Tue, 7 Oct 2025 11:22:02 +0000 (14:22 +0300)
Add the linenoise line editing package.
It's a compact embedded replacement for readline and libedit.
It will be used in sqlite3-cli initially, but other packages
that support it, may follow.

Signed-off-by: Maxim Storchak <[email protected]>
libs/linenoise/Makefile [new file with mode: 0644]

diff --git a/libs/linenoise/Makefile b/libs/linenoise/Makefile
new file mode 100644 (file)
index 0000000..c65dbb5
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=linenoise
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/antirez/linenoise.git
+PKG_SOURCE_DATE:=2025-09-10
+PKG_SOURCE_VERSION:=880b94130ffa5f8236392392b447ff2234b11983
+PKG_MIRROR_HASH:=a554a5ea9b2111cfb1d844a072933109f8316914eb40edca3919915a5ddb5df9
+
+PKG_MAINTAINER:=Maxim Storchak <[email protected]>
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/linenoise
+  TITLE:=A minimal, zero-config, readline replacement
+  CATEGORY:=Libraries
+  URL:=https://github.com/antirez/linenoise
+  BUILDONLY:=1
+endef
+
+define Package/linenoise/description
+ A minimal, zero-config, BSD licensed, readline replacement used in Redis,
+ MongoDB, Android and many other projects.
+endef
+
+define Build/Compile
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/linenoise
+       $(CP) $(PKG_BUILD_DIR)/linenoise.[ch] $(1)/usr/include/linenoise
+endef
+
+define Build/Clean
+       $(RM) -rf $(STAGING_DIR)/usr/include/linenoise
+endef
+
+$(eval $(call BuildPackage,linenoise))